% 系统微分方程

function dxdt = mCNN(~, x, A, B, k)
    X1 = x(1:3);
    X2 = x(4:6);
    q11 = x(7);
    q21 = x(8);
    phi = x(9);

    M1 = exp(-q11);
    M2 = exp(-q21);
    Y1 = M1 .* X1;
    Y2 = M2 .* X2;

    W_phi = 1 - 2*exp(phi);
    K = diag([0, 0, k]);

    dX1 = -X1 + A*Y1 + B*X1 + K*W_phi*(X1 - X2);
    dX2 = -X2 + A*Y2 + B*X2 - K*W_phi*(X1 - X2);
    dq11 = X1(1);
    dq21 = X2(1);
    dphi = X1(3) - X2(3);

    dxdt = [dX1; dX2; dq11; dq21; dphi];
end